#include <bits/stdc++.h>
using namespace std;

// #define ONLINE_JUDGE

#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

typedef long long LL;
const int N = 1e3+5, M = 15, MOD = 1e9+7;

LL s1[M][N], f1[M][N], s2[M][N], f2[M][N];

int n, m;
int main(int argc, char const *argv[])
{
	scanf("%d%d", &n, &m);
	s1[0][0] = f1[0][0] = 1;
	for (int i=1; i<=n; ++i)
		s1[0][i] += s1[0][i-1];
	for (int i=1; i<=m; ++i)
	{
		for (int j=1; j<=n; ++j)
		{
			f1[i][j] = s1[i-1][j];
			s1[i][j] = (s1[i][j-1] + f1[i][j]) % MOD;
		}
	}


	f2[0][n+1] = s2[0][n+1] = 1;
	for (int i=n; i>=1; --i)
		s2[0][i] += s2[0][i+1];
	for (int i=1; i<=m; ++i)
	{
		for (int j=n; j>=1; --j)
		{
			f2[i][j] = s2[i-1][j];
			s2[i][j] = (s2[i][j+1] + f2[i][j]) % MOD;
		}
	}
	LL ans = 0;
	for (int i=1; i<=n; ++i)
	for (int j=i; j<=n; ++j)
	{
		ans = (ans + f1[m][i] * f2[m][j]) % MOD;
	}
	printf("%lld\n", ans);
	return 0;
}